Repository navigation
Conversation
7 of 14 tasks
CamWight
force-pushed
the
drawing-view-command-5866
branch
from
October 25, 2026 14:39
800a67b to
42a9ed2
Compare
CamWight
force-pushed
the
drawing-view-command-5866
branch
from
October 26, 2026 10:21
42a9ed2 to
cbe498d
Compare
This was referenced Oct 26, 2026
CamWight
force-pushed
the
drawing-view-command-5866
branch
from
October 26, 2026 16:37
cbe498d to
5bb34f4
Compare
…#3890) K3b of the drawing storage plan, after tangency-labs#7098: a drawing lives in the file of the design it draws (bherbruck's proposal, Cameron's choice), so the separate drawing file goes. - `Document.drawings`: the design's drawings, each its own record of the drawing family (`solidcraft-drawing/N`), each behind its own `Arc`. Every reader and writer of a design now carries them: save, Save As, autosave and recovery, crash copies, the CLI. - A design container keeps each drawing in its own entry, `drawings/<id>.json` (Deflate), beside `document.json`, which holds nothing of them: its bytes, and the model cache keyed to them, are the same with drawings or without. A plain JSON design keeps them inline under `drawings`. - Each drawing is read by its own family's rules, taken out of the design's JSON before the design's own checks. One a build can't read (a newer number, a change it doesn't know, damage) refuses the whole design, never dropped. So does an entry under `drawings/` that isn't a drawing's, one whose record has another id, drawings inline in a container's `document.json`, two drawings with one id, or more than 1,000 (counted before any is read). A design is never saved with two drawings of one id. - Drawings are listed by name, then id: no stored order, nothing to merge when two people add drawings. - A drawing has an `id`, unique among its design's drawings (`Drawing::new` takes the ids already taken). Its source is the design it is in: at most one, an id and no path. - One pending design change, `drawings`: the last release refuses a design saved with it, so it never opens one and saves it without its drawings. One pending drawing change, `in-design`, for the record's new shape. - Gone: `read_drawing`, `read_drawing_file`, `write_drawing_container`, `file_kind`, `FileKind`, `DRAWING_EXT` and `is_drawing_path`. `read_document`, `read_design` and the container writer are as they were before tangency-labs#7098, with the drawings added. Tests: a design's drawings round-trip through both forms byte for byte, with `document.json` and `container.json` the same with drawings or without; their order; every refusal above; a drawing's properties kept as other tools wrote them while a sheet's number out of range is refused; the drawing's id among its objects', a new drawing's id none of the design's; a design with two drawings of one id not saved; mutation fuzz of a design with drawings in both forms. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ndo (tangency-labs#3890) K4' of the drawing storage plan, on K3b (a drawing lives in its design's file): make, list, open, close and delete a design's drawings, and read and change the open one's settings and properties. It replaces tangency-labs#3891's drawing sessions, which held a drawing as a file of its own. - `drawing.create {name?, language?, units?}` adds a drawing of the design (one ISO A3 landscape sheet with the ISO border, the design its one source) and opens it; refused on an empty design. `drawing.list`, `drawing.open {drawing}`, `drawing.close`, `drawing.delete {drawing}`. `drawing.inspect`, `drawing.set`, `drawing.properties`, `.properties.set`, `.properties.remove` work on the open drawing. Labels in en, ja and zh. - The open drawing is the session's (`Session::open_drawing`, kept in checkpoints), and the part gate keeps the parts apart: a command says the part it works on, the model unless it says otherwise (`.in_drawing()`, `.any_part()`). While a drawing is open the model's commands wait ("a drawing is open: close it to change the model"); the drawing's run only while one is. Files, recovery, undo and redo, checkpoints, selection, diagnostics, the command list and choosing a drawing work either way. `CommandSpec::allowed` is the one check running a command, running it inside another and listing it make. - `Session::drawing` and `Session::edit_drawing` are the open drawing's one way in: an edit is kept when it changed something and still keeps the record's rules, in a new design whose other drawings are shared. - A change that only touches drawings evaluates nothing: `Document::differs_only_in_drawings` joins the render-only path, as render settings and part properties do. A model edit shares every drawing, so it pays nothing for the check. - Undo per part: a step records the part it changed (`Snapshot::part`: a drawing, or the model and its list of drawings). Undo and redo go through the open part's steps only. A drawing's step puts back only that drawing; the model's step puts back the design as it was, keeping each drawing it had as it is now. Making and deleting a drawing are the model's steps. A new step ends what could be redone in its own part only. `Snapshot::of` is the one place a step is taken. - An agent's message that changed several parts keeps their steps apart, rather than merging them into one step that would undo only one part. - `cmd::metadata`'s rules for reading, setting and removing properties are written once (`reading`, `setting`, `removing`) and used by the design's and the drawing's commands. - `drawing::sort` is the one place the drawings' order (by name, then id) is kept; `Document::put_drawing` adds or replaces one in that order. Tests: making, listing, opening, closing and deleting; what making one refuses, at the cap too; the gate both ways, inside another command and in the command list; drawing edits as undo steps that evaluate nothing over 100 rounds; undo and redo per part with model and drawing steps interleaved; redo ended per part; the order by name, then id, after renames; delete and its undo; refused changes; checkpoints; save and open in both forms; properties; hostile values for every command that runs with a drawing open, from the registry; a fuzz of the steps in any order. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
drawing.open now joins doc.open in the suggestion for `file.open`, as the rule says: both end in the same word. The engine's and the CLI's tests check that doc.open comes first and let other close ids follow, as the `solid.extrud` line beside them already does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tangency-labs#5866) ModelBody::mesh_bounds_in(plane) is the box of a body's mesh in a plane's own coordinates (Plane::to_local), beside mesh_bounds and in the same way: a body meshed already is measured from its own mesh, and a placement of a part from its definition's shared mesh, with the placement folded into the plane's two axes once (two dot products a point), so no moved copy is made. W07's drawing.view measures a view's extents with it. Tests: a 100 x 50 x 20 block seen on the three principal pairs of axes and from an isometric corner (150/sqrt(2) by 190/sqrt(6), worked by hand), a plane away from the origin, and every placement in the shared-mesh test against its moved mesh, still without a moved copy, and the same again from its own mesh once it is meshed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… their parent (tangency-labs#4816, W17a) W17a's second slice: the principal views derived from a base view. - `ProjectedSide` (left, right, above, below): the side of its parent a projected view sits on. - `projected_basis(parent, side, projection)`: in third angle a view shows the side of the model it sits on (one to the right looks from the right), in first angle the side away from it (ISO 5456-2). It's the parent's basis turned a quarter turn about one of its paper axes, through its origin, with no -0. From the front view it gives exactly the named views: right, left, top and bottom in third angle; left, right, bottom and top in first. - `ViewFrame::aligned(side, projection, centre, position_mm)`: a projected view at its parent's scale, lined up with it, so it moves only along the free axis. - The projection is S2's `cell::Projection`, the value the title block's symbol reads, so a drawing has one first-or-third setting. Tests: the front view's projections are the named views in both angles, with no -0; from every named view and a leaning one, a projected view looks from its side and keeps the parent's other axis and origin, four turns or a turn and its opposite bring the parent back; a box's corners line up across aligned views in both angles; hostile parents, centres and positions refused. Corner (isometric) projected views wait for one convention check on first angle. The derivation graph (projected from, aligned to, cycles refused) moves to the view record in the drawing file, where the view ids live. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…19a) `geom::drawing_measure` is what a dimension on a view reads, in model mm or radians, from model points and edges and the view's basis: one rule for every dimension. The view's scale and place on the sheet never enter. - `linear`: horizontal and vertical along the view's paper x and y, aligned as the view shows the segment, or along a direction picked on the view; a true reading is the segment's own length (aligned only). - `angle`: from the view's horizontal or vertical, a model axis as the view shows it, or another edge, from 0 to π as each line is oriented; a true reading is between model lines. - `foreshortened` says a measured line isn't parallel to the view's plane. - Refused with a reason: points that aren't finite or are past 1e12 mm, an invalid basis, a zero-length segment, a line seen end-on, a zero direction, a zero reading, parallel lines, and a true reading where there is none. `drawing_view`'s `PARALLEL` and `require` are shared. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tangency-labs#5866, W07 V2) The first slice of W07: one orthographic view of the design, worked out and returned as data, before any line is drawn, so scripts can lay views out by their boundaries. - `drawing.view.snapshot` takes the view's settings, the sheet it goes on (A3 landscape at 300 dpi when not given) and where its centre goes (the sheet's centre when not given). With no scale it takes the largest ISO 5455 scale at which the view, centred there, lies inside the sheet's drawing border. It returns the resolved view, the scale (and whether it was fitted), the extents on the view's plane, the boundary on the sheet and what it was drawn from. Read-only and not undoable; it opens nothing and saves nothing. - Every body the design places is in the view, wherever its occurrences place it; the browser's eye counts for nothing (`engine::drawing_view::extents`, from P2's `mesh_bounds_in`). A design whose assembly walk stops at its limits (deeper than 64 levels, or past 100,000 placements) is refused rather than drawn with parts left out: `Document::placements_complete`, beside the walk, says whether every placement it holds had its occurrences walked. - `doc::drawing_view::ViewSettings` is the view's one parameter set: the view (named, or a direction and an up), the scale, the two visual styles, the reference settings and tangent edges. A saved view (W12) keeps the same fields; no scale is written as none, not null, so what it writes reads back as the snapshot's parameters. - `render::VisualStyle` names the five styles: visible, visible_hidden, shaded, shaded_visible and shaded_visible_hidden. The shaded ones are refused as not supported yet until the drawing renderer (tangency-labs#5624). - The command has a typed contract (input and output schemas). Its handler reads the contract's own type through `schema::read`, in the contract check's own words, so the check's levels give one message for one mistake and an unknown field is refused by name. The reply includes the sheet, its defaults filled in. Tests: the 100 x 50 x 20 block's boundary in the front, top, right and isometric views at 1:2, worked by hand; the fitted scale on A3 and A4 and near the border; scale, position and margin; the browser's eye ignored; the design untouched; each hostile setting refused; the walk's depth limit one level either side; the contract's keys the same as the settings' own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 27, 2026
Closed
CamWight
force-pushed
the
drawing-view-command-5866
branch
from
October 27, 2026 10:42
5bb34f4 to
cce39b4
Compare
This was referenced Oct 27, 2026
Closed
DevonHope
added a commit
to DevonHope/solidcraft
that referenced
this pull request
Oct 27, 2026
Upstream merged three of the PRs this beta was stacking, straight into the drawings branch, at 04:18-04:20 UTC on 2026-10-27: tangency-labs#4817 (de7bf4f, view definitions), tangency-labs#3877 (3575c99, title blocks) and tangency-labs#2457 (ebafe07, exact orthographic hidden lines). Taking the branch brings all three in as proper upstream merges instead of stacked PR heads, so the old plan of merging tangency-labs#5867 to get tangency-labs#3877 is gone. Conflicts came from one cause: this branch holds tangency-labs#4817's OLD head (77e58df, via tangency-labs#7316 5538972), and the branch brings tangency-labs#4817's merged version. Resolved file by file, keeping whichever side is newer: - geom/profile.rs, geom/lib.rs, geom/tests.rs, doc/eval_more.rs, doc/sheet.rs: kept OURS. These are tangency-labs#7316's ArcMap work (ArcMap, Seg2::mapped, similar() through it, the every_kind_of_segment helper and its two tests), newer than the inline arc matches on the branch. map_controls stays private: its only callers went through mapped, and the one hit elsewhere is an unrelated ui-egui function of the same name. - geom/drawing_view.rs, geom/drawing_view_tests.rs: took THEIRS, the merged tangency-labs#4817 (291 and 273 lines against our 269 and 203). Our copies came only from 77e58df, so nothing of ours is lost. Its only use of the arc code is seg.similar(&self.map), which ours still provides. Auto-merged hunks were read for silent drops, the way c443412's were: doc/format.rs keeps check_design_numbers, geom/aabb2.rs gains intersection(), geom/paper.rs exports MAX_COORDINATE_MM, geom/drawing_sheet.rs only updates a doc comment. New files: geom/hlr/ (exact HLR, 6,725 lines), geom/cell.rs, geom/title_block.rs and their tests. Checked on macOS with targeted tests only, as PROGRESS.md section 5 requires: solidcraft-geom 276 passed, solidcraft-doc 464, solidcraft-io 179, all with 0 failed; cargo fmt --check, cargo xtask lists and cargo xtask skills pass; the merged tree passes cargo check for geom and doc. NOT run on this machine: the engine targeted tests, clippy -D warnings, and cargo check -p solidcraft. Those runs overloaded the machine and were stopped, so the three gates are still owed before this base is relied on. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
DevonHope
added a commit
to DevonHope/solidcraft
that referenced
this pull request
Oct 27, 2026
…d machine B Records what changed since session 1: upstream merged tangency-labs#4817, tangency-labs#3877 and tangency-labs#2457 into the drawings branch overnight and force-pushed tangency-labs#5867, so section 6 is rewritten around the stack as it is now. Adds machine B (the Mac), its build caps after it was overloaded, and the owner's decision still open on tangency-labs#3891. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
DevonHope
added a commit
to DevonHope/solidcraft
that referenced
this pull request
Oct 27, 2026
…before merging it Updates the status block now that the owner has approved pushing everything after 98bd4a4: - Pushed?: the whole branch is on the fork, with the reminder that each later push needs the owner's OK again (section 5). - Next action: re-fetch tangency-labs#5867's head first. It was force-pushed on 2026-10-27, so the head section 6.1 was first written against (5bb34f49) no longer exists, and it changed again at 10:42 UTC. - Machine B: where the dev build of 2614035 is, and which environment variables the Bash launchers in Appendix A set. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
CamWight
marked this pull request as ready for review
October 27, 2026 20:40
DevonHope
added a commit
to DevonHope/solidcraft
that referenced
this pull request
Oct 28, 2026
…, W07 V2) Head cce39b4, stacked on tangency-labs#3891 (already merged here as 6926136), so only its own four commits come in: model extents on a plane (30906de), projected views in first or third angle (bedae91), measurement on view frames (cfa5602) and drawing.view.snapshot itself (cce39b4). 4 conflict regions in 4 files, each both sides adding a line in the same place, all kept: - engine/src/lib.rs, render/src/lib.rs: mod lines, kept sorted (drawing_view before easyprint; transmission before visual_style). - engine/src/schema/mod.rs: main's export of run_checked_as with tangency-labs#5867's pub(crate) use check::read. - engine/src/tests.rs: the hostile-parameter key list takes both sides' keys. The checked! mismatch: tangency-labs#5867's one call site used a 3-argument form (id, contract, handler). main's macro takes 2 and finds the contract through .contract(&CONTRACT), which the spec already has, so the call site is now checked!("drawing.view.snapshot", snapshot). No other 3-argument use exists. tangency-labs#5867's only deletions are geom drawing_view's require() and PARALLEL, which become pub(crate) for drawing_measure, so nothing is lost. Checked on Windows (laptop), 4 jobs, 2 test threads: - cargo check --all-targets on geom, doc, render, engine: clean apart from the two Windows-only dead-code warnings upstream main already has. - geom drawing 38, doc drawing 19, render visual_style 1, engine --lib drawing + schema:: 70, hostile_params_never_panic: all pass. - The three engine tests that fail on macOS pass here: prism_local_tests::a_ring_cut_round_a_counterbored_hole_in_a_chamfered_disc and robustness_goldens seeds 36 and 71. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DevonHope
added a commit
to DevonHope/solidcraft
that referenced
this pull request
Oct 28, 2026
…range) Records session 4 on the laptop: - Phase 1 is done: tangency-labs#5867 (09c3052) and tangency-labs#6788 (4f18dde) merged, the ten drawing.* commands have schemas (3232bbb), every check the Mac left for the laptop passes on Windows (wasm, CLI run_results, clippy on six crates, and the three macOS-only failures), and the app starts and runs the drawing commands over the control channel. - BETA-BASE.md gains rows 8 and 9 and the schemas commit. - Section 6.9: upstream main (9fb41f8) is 144 commits past the base; a dry run conflicts in 5 files, all additive, with nothing lost or duplicated. The owner chose to finish Phase 1 first, then merge it. - Section 5: the robustness_goldens filter matches 104 tests (40 minutes lost to it), hostile_params_never_panic uses every core (pin it), laptop build times, PowerShell 5.1 quoting, and Synology syncing target/. - Section 8.5: tangency-labs#6788's author answered our review and asked for another look; nothing posted. - Phase 7 and section 8.8: the owner's Arrange feature (nesting cut pieces on stock sheets, or footprints on a build plate), after drawings, with RFC tangency-labs#3820, tangency-labs#1626, the CAM milestone and the ribbon's existing "Arrange" group noted. - Fixes a link the Mac's edit of section 6.2 broke. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DevonHope
added a commit
to DevonHope/solidcraft
that referenced
this pull request
Oct 28, 2026
Records the merge of upstream main (51f0c2d) on the laptop: - Status: Phase 1 done and main merged; next is Phase 2, starting from the exact view basis and view lines, since tangency-labs#3891 and tangency-labs#5867 already give the session, records and drawing.view.snapshot. - BETA-BASE.md row 10: upstream main 9fb41f8. - Section 6.9 marked done, with the placement_reuse.rs decision. - Session 4 log: the merge, its checks (doc 96, io 71, engine 135), and the launch of the merged app, where per-drawing undo works end to end; the dev build's leftover "Recover unsaved design?" prompt and why. - Section 8.6: the dev window now says v0.25.1, and the recovery prompt. - Fixes the links to the renamed section 6.6. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #5866 (W07, the drawing-view command): its first working slice, V2, as the plan on the issue sets out (Q9, and Cameron's answers there). Title blocks (#3877) and view definitions (#4817) are in
drawingsnow, and this branch has moved onto it and onto the drawing slices it stacks on.Changes a default: no
What's here, bottom to top
Only the last commit is this PR's own. The others are the drawing slices under it, each in its own PR, and they leave this diff as they land:
ModelBody::mesh_bounds_in(plane), a body's extents in a plane's own coordinates, which the snapshot measures with;drawing.view.snapshot.drawing.view.snapshotOne orthographic view of the design, worked out and returned as data. It opens nothing, saves nothing and can't be undone (there's nothing to undo).
view(a named view, or{direction, up, origin?}),scale("paper:model"),display_style,reference_style,reference_hides_model,reference_margin_mmandtangent_edges. These aredoc::drawing_view::ViewSettings, which a saved view (W12) will keep too, so there's one parameter set.sheet: {size, orientation, dpi}, A3 landscape at 300 dpi when not given;position_mmis where the view's centre goes, the sheet's centre when not given.named,direction,x,y,origin), the scale (text,factor,fitted),position_mm,extentson the view's plane in model mm (approximate, from the display mesh, witherror_mm),boundary_mmon the sheet, andsource. No lines yet: they're V3.render::VisualStylenames the five styles (visible, visible_hidden, shaded, shaded_visible, shaded_visible_hidden); Viewport: pick the visual style from a menu, and add Translucent (#4628) #5219's and Proposal: display style, section views and material display as their own saved settings #5307's styles can map to it.Tests
Hand-worked values:
The block's boundary at 1:2. For a 100 × 50 × 20 mm block, centred on its position:
The fitted scale: 2:1 on A3, giving the plan's 110..310 × 128.5..168.5; 1:1 on A4 portrait; 1:1 near the border; refused off it.
Scale, position and margin: scale and position only scale and move the boundary; a 5 mm margin at 1:2 adds 2.5 mm on each side.
What the view ignores and changes: a body hidden in the browser is still drawn, and the design, its undo list and its saved state don't change.
Hostile settings: each is refused with its own message: the scales, views, styles, dpi, sheet, margin and position, and an unknown field. So are a view past ±100,000 mm on paper and an empty design.
The contract: its keys are the settings' own keys plus
sheetandposition_mm, and strict mode gives the same errors as the handler.The shared hostile-parameter pass now sends hostile values for the new keys to every command.
Planted faults: 19 of 19 caught, then a clean run: V2's 16 and P2's 3. The code is the same as when they ran.
Validation
drawingsebafe07, with the stack under it: fmt; thedoclibrary tests (313); the engine's drawing tests (181); therenderlibrary tests (118); clippy with all targets ongeom,doc, the engine and any other crate it touches; a check ofui-egui, the CLI and the app; and the wasm check (geom,doc, the engine): all pass.drawings4c4f251), the gate (Windows) on a tree with this and the other drawing slices passed apart from three tests, none from these changes. Ondrawingsebafe07, the gate (Windows) once on the top of this stack (ab75908, with every slice up to S5's first part): fmt, assets, icons, licences, lists, layers, ui-containers, both clippy runs, wasm and web offline all pass; 6,293 tests passed, 4 failed and 57 ignored, in 76 test binaries. None of the four is from this stack, which changes no file they test:icon_audit'srequested_menu_icons_have_artwork_and_match_manifestand xtask'sui_containerstest fail on a Windows checkout (fixed onmainin ci: fix local scheduling and Windows test baselines #4941 and icon_audit: compare the requested-icons manifest with CRLF checkouts ignored (#4932) #4960);cmd::clearance::tests::a_pin_seated_line_to_line_in_its_bushing_is_measuredis on the same PC's known list; and the kernel'sboolean_props::commutativefailed on a case proptest drew at random (a cylinder against a sphere, where truck refuses a tolerance under 1e-6).What the tests don't reach
error_mm. No case compares that against an exact silhouette.reference_styleandreference_hides_modelare only checked here, andreference_margin_mmgrows the boundary whatever the parts are.hideare V4; every placement is shown.Integration status
Based on
drawingsebafe07, on #7612 (W19a). Nearby, checked on 2026-10-27: Nathan-Dane's draft #5349 adds lines next to the stack's incrates/engine/src/cmd/mod.rs; keeping both sides resolves it, and no command id is shared. V3 (the view's lines) comes next, as its own PR.Refs #860